#ifndef JOINT_CONTROLLER_H_
#define JOINT_CONTROLLER_H_
#include "../motion9_dll.h"
#include "joint_queue.h"
#include "cubic.h"

#define JC_BUFF_LEN 15

typedef struct{
	float current_t;
	float segment_t;
	STRUCT_CUBIC_PARAM cubic_para[MAX_JOINT];
	STRUCT_CUBIC_FACTOR cubic_factor[MAX_JOINT];
	double p[3][MAX_JOINT];
	float v[2][MAX_JOINT];
	//-------------------------
	STRUCT_JOINT_SEGMENT queue[JC_BUFF_LEN+5];
	STRUCT_JOINT_QUEUE jcq;
}STRUCT_JOINT_CONTROL;

int jcComputeRuncle(STRUCT_JOINT_CONTROL *jc);
void jcClear(STRUCT_JOINT_CONTROL *jc);
void jcInit(STRUCT_JOINT_CONTROL *jc);


#endif

